package br.usp.trabalho.sd;

import java.io.Serializable;

public class FileInfo implements Serializable
{
    private static final long serialVersionUID = -9222887454000186092L;

    private String    mFileName;
    private long      mFileSize;
    private String    mFileNodeName;
    protected boolean mLock;


    public FileInfo(String fileName, long size, String nodeName, boolean lock)
    {
        mFileName = fileName;
        mFileSize = size;
        mFileNodeName = nodeName;
        mLock = lock;
    }
    public FileInfo(String fileName, long size, String nodeName)
    {
        this(fileName, size, nodeName, false);
    }

    // Getters
    public boolean isLocked()    { return mLock; }
    public String  getFileName() { return mFileName; }
    public long    getFileSize() { return mFileSize; }
    public String  getFileHost() { return mFileNodeName; }

    // Setters
    public void setFileName(String fileName) { mFileName = fileName; }
    public void setFileSize(long   fileSize) { mFileSize = fileSize; }
    public void setFileHost(String fileHost) { mFileNodeName = fileHost; }
}
